home *** CD-ROM | disk | FTP | other *** search
/ Aminet 3 / Aminet 3 - July 1994.iso / Aminet / dev / obero / Interfaces3_4.lha / Interfaces / DiskFont.mod < prev    next >
Text File  |  1994-03-05  |  20KB  |  492 lines

  1. (*
  2. (*
  3. **  Amiga Oberon Interface Module:
  4. **  $VER: DiskFont.mod 40.15 (28.12.93) Oberon 3.0
  5. **
  6. **   © 1993 by Fridtjof Siebert
  7. **   updated for V39, V40 by hartmut Goebel
  8. *)
  9. *)
  10.  
  11. MODULE DiskFont;
  12.  
  13. IMPORT
  14.   e * := Exec,
  15.   g * := Graphics,
  16.   I * := Intuition,
  17.   u * := Utility;
  18.  
  19. CONST
  20.   maxFontPath * = 256;    (* including null terminator *)
  21.   diskfontName * = "diskfont.library";
  22.  
  23. TYPE
  24.   FontContentsPtr * = UNTRACED POINTER TO FontContents;
  25.   FontContents * = STRUCT
  26.     fileName * : ARRAY maxFontPath OF CHAR;
  27.     ySize * : INTEGER;
  28.     style * : SHORTSET;
  29.     flags * : SHORTSET;
  30.   END;
  31.  
  32.  
  33.   TFontContentsPtr * = UNTRACED POINTER TO TFontContents;
  34.   TFontContents * = STRUCT
  35.     fileName * : ARRAY maxFontPath-2 OF CHAR;
  36.     tagCount * : INTEGER;
  37.     (*
  38.      *  if tfc_TagCount is non-zero, tfc_FileName is overlayed with
  39.      *  Text Tags starting at:  (struct TagItem * )
  40.      *      &tfc_FileName[MAXFONTPATH-(tfc_TagCount*sizeof(struct TagItem))]
  41.      *)
  42.     ySize * : INTEGER;
  43.     style * : SHORTSET;
  44.     flags * : SHORTSET;
  45.   END;
  46.  
  47. CONST
  48.   fchId     * = 00F00H;  (* FontContentsHeader, then FontContents *)
  49.   tfchId    * = 00F02H;  (* FontContentsHeader, then TFontContents *)
  50.   ofchID    * = 00F03H;  (* FontContentsHeader, then TFontContents,
  51.                           * associated with outline font *)
  52.  
  53. TYPE
  54.   FontContentsHeaderPtr * = UNTRACED POINTER TO FontContentsHeader;
  55.   FontContentsHeader * = STRUCT
  56.     fileID * : INTEGER;         (* FCH_ID *)
  57.     numEntries * : INTEGER;     (* the number of FontContents elements *)
  58.  (* fc  * : ARRAY numEntries OF FontContents or
  59.     tfc * : ARRAY numEntries OF TFontContents    *)
  60.   END;
  61.  
  62. CONST
  63.  
  64.   dfhId       * = 00F80H;
  65.   maxFontName * = 32;     (* font name including ".font\0" *)
  66.  
  67. TYPE
  68.   DiskFontHeaderPtr * = UNTRACED POINTER TO DiskFontHeader;
  69.   DiskFontHeader * = STRUCT (df * : e.Node)  (* node to link disk fonts *)
  70.     (* the following 8 bytes are not actually considered a part of the  *)
  71.     (* DiskFontHeader, but immediately preceed it. The NextSegment is   *)
  72.     (* supplied by the linker/loader, and the ReturnCode is the code    *)
  73.     (* at the beginning of the font in case someone runs it...          *)
  74.     (*   ULONG dfh_NextSegment;                 \* actually a BPTR      *)
  75.     (*   ULONG dfh_ReturnCode;                  \* MOVEQ #0,D0 : RTS    *)
  76.     (* here then is the official start of the DiskFontHeader...         *)
  77.     fileID   * : INTEGER;        (* DFH_ID *)
  78.     revision * : INTEGER;        (* the font revision *)
  79.     segment  * : e.BPTR;         (* the segment address when loaded *)
  80.     name     * : ARRAY maxFontName OF CHAR; (* the font name (null terminated) *)
  81.     tf       * : g.TextFont;     (* loaded TextFont structure *)
  82.   END;
  83.  
  84. (* unfortunately, this needs to be explicitly typed *)
  85. (* used only if dfh_TF.tf_Style FSB_TAGGED bit is set *)
  86. (*#define dfh_TagList     dfh_Segment     (* destroyed during loading *)*)
  87.  
  88.  
  89. CONST
  90.   memory  * = 0;
  91.   disk    * = 1;
  92.   scaled  * = 2;
  93.   bitmap  * = 3;
  94.  
  95.   tagged  * = 16;  (* return TAvailFont *)
  96.  
  97. TYPE
  98.   AvailFontPtr * = UNTRACED POINTER TO AvailFont;
  99.   AvailFont * = STRUCT
  100.     type * : SET;            (* MEMORY, DISK, or SCALED *)
  101.     attr * : g.TextAttr;     (* text attributes for font *)
  102.   END;
  103.  
  104.   TAvailFontPtr * = UNTRACED POINTER TO TAvailFont;
  105.   TAvailFont * = STRUCT
  106.     type * : SET;          (* MEMORY, DISK, or SCALED *)
  107.     attr * : g.TTextAttr;  (* text attributes for font *)
  108.   END;
  109.  
  110.   AvailFontsHeaderPtr * = UNTRACED POINTER TO AvailFontsHeader;
  111.   AvailFontsHeader * = STRUCT
  112.     numEntries * : INTEGER;      (* number of AvailFont elements *)
  113.  (* af  * : ARRAY numEntries OF AvailFont or
  114.     taf * : ARRAY numEntries OF TAvailFont   *)
  115.   END;
  116.  
  117. (* ---------------------------------------------------------------- *)
  118. CONST
  119.  
  120. (* Level 0 entries never appear in the .otag tag list, but appear in font
  121.  * specifications *)
  122.   level0 * =      u.user;
  123. (* Level 1 entries are required to exist in the .otag tag list *)
  124.   level1 * =      u.user + 1000H;
  125. (* Level 2 entries are optional typeface metric tags *)
  126.   level2 * =      u.user + 2000H;
  127. (* Level 3 entries are required for some OT_Engines *)
  128.   level3 * =      u.user + 3000H;
  129. (* Indirect entries are at (tag address + data offset) *)
  130.   indirect * =    08000H;
  131.  
  132.  
  133. (********************************************************************)
  134. (* font specification and inquiry tags *)
  135.  
  136. (* !  tags flagged with an exclaimation mark are valid for
  137.  *    specification.
  138.  *  ? tags flagged with a question mark are valid for inquiry
  139.  *
  140.  * fixed binary numbers are encoded as 16 bits of integer and
  141.  * 16 bits of fraction.  Negative values are indicated by twos
  142.  * complement of all 32 bits.
  143.  *)
  144.  
  145. (* !  OT_DeviceDPI specifies the target device dots per inch -- X DPI is
  146.  *    in the high word, Y DPI in the low word. *)
  147.   deviceDPI * =   level0 + 001H;      (* == TA_DeviceDPI *)
  148.  
  149. (* !  OT_DotSize specifies the target device dot size as a percent of
  150.  *    it's resolution-implied size -- X percent in high word, Y percent
  151.  *    in low word. *)
  152.   dotSize * =     level0 + 002H;
  153.  
  154. (* !  OT_PointHeight specifies the requested point height of a typeface,
  155.  *    specifically, the height and nominal width of the em-square.
  156.  *    The point referred to here is 1/72".  It is encoded as a fixed
  157.  *    binary number. *)
  158.   pointHeight * = level0 + 008H;
  159.  
  160. (* !  OT_SetFactor specifies the requested set width of a typeface.
  161.  *    It distorts the width of the em-square from that specified by
  162.  *    OT_PointHeight.  To compensate for a device with different
  163.  *    horizontal and vertical resolutions, OT_DeviceDPI should be used
  164.  *    instead.  For a normal aspect ratio, set to 1.0 (encoded as
  165.  *    0x00010000.  This is the default value. *)
  166.   setFactor * =   level0 + 009H;
  167.  
  168. (* !  OT_Shear... specifies the Sine and Cosine of the vertical stroke
  169.  *    angle, as two fixed point binary fractions.  Both must be specified:
  170.  *    first the Sine and then the Cosine.  Setting the sine component
  171.  *    changes the Shear to an undefined value, setting the cosine
  172.  *    component completes the Shear change to the new composite value.
  173.  *    For no shear, set to 0.0, 1.0 (encoded as 000000000, 0x00010000).
  174.  *    This is the default value. *)
  175.   shearSin * =    level0 + 00AH;
  176.   shearCos * =    level0 + 00BH;
  177.  
  178. (* !  OT_Rotate... specifies the Sine and Cosine of the baselin rotation
  179.  *    angle, as two fixed point binary fractions.  Both must be specified:
  180.  *    first the Sine and then the Cosine.  Setting the sine component
  181.  *    changes the Shear to an undefined value, setting the cosine
  182.  *    component completes the Shear change to the new composite value.
  183.  *    For no shear, set to 0.0, 1.0 (encoded as 0x00000000, 0x00010000).
  184.  *    This is the default value. *)
  185.   rotateSin * =   level0 + 00CH;
  186.   rotateCos * =   level0 + 00DH;
  187.  
  188. (* !  OT_Embolden... specifies values to algorithimically embolden -- or,
  189.  *    when negative, lighten -- the glyph.  It is encoded as a fixed point
  190.  *    binary fraction of the em-square.  The X and Y components can be
  191.  *    changed indendently.  For normal characters, set to 0.0, 0.0
  192.  *    (encoded as 0x00000000, 0x00000000).  This is the default value. *)
  193.   emboldenX * =   level0 + 00EH;
  194.   emboldenY * =   level0 + 00FH;
  195.  
  196. (* !  OT_PointSize is an old method of specifying the point size,
  197.  *    encoded as (points * 16). *)
  198.   pointSize * =   level0 + 010H;
  199.  
  200. (* !  OT_GlyphCode specifies the glyph (character) code to use with
  201.  *    subsequent operations.  For example, this is the code for an
  202.  *    OT_Glyph inquiry *)
  203.   glyphCode * =   level0 + 011H;
  204.  
  205. (* !  OT_GlyphCode2 specifies the second glyph code.  For example,
  206.  *    this is the right glyph of the two glyphs of an OT_KernPair
  207.  *    inquiry *)
  208.   glyphCode2 * =  level0 + 012H;
  209.  
  210. (* !  OT_GlyphWidth specifies a specific width for a glyph.
  211.  *    It sets a specific escapement (advance) width for subsequent
  212.  *    glyphs.  It is encoded as a fixed binary fraction of the em-square.
  213.  *    To revert to using the font-defined escapement for each glyph, set
  214.  *    to 0.0 (encoded as 0x00000000).  This is the default value. *)
  215.   glyphWidth * =  level0 + 013H;
  216.  
  217. (* !  OT_OTagPath and
  218.  * !  OT_OTagList specify the selected typeface.  Both must be specified:
  219.  *    first the Path and then the List.  Setting the path name changes
  220.  *    changes the typeface to an undefined value, providing the List
  221.  *    completes the typeface selection to the new typeface.  OTagPath
  222.  *    is the null terminated full file path of the .otag file associated
  223.  *    with the typeface.  OTagList is a memory copy of the processed
  224.  *    contents of that .otag file (i.e. with indirections resolved).
  225.  *    There are no default values for the typeface. *)
  226.   oTagPath * =    level0 + indirect + 014H;
  227.   oTagList * =    level0 + indirect + 015H;
  228.  
  229. (*  ? OT_GlyphMap supplies a read-only struct GlyphMap pointer that
  230.  *    describes a bitmap for a glyph with the current attributes. *)
  231.   glyphMap * =    level0 + indirect + 020H;
  232.  
  233. (*  ? OT_WidthList supplies a read-only struct MinList of struct
  234.  *    GlyphWidthEntry nodes for glyphs that are defined from GlyphCode
  235.  *    to GlyphCode2, inclusive.  The widths are represented as fixed
  236.  *    binary fractions of the em-square, ignoring any effect of
  237.  *    SetFactor or GlyphWidth.  A width would need to be converted to
  238.  *    a distance along the baseline in device units by the
  239.  *    application. *)
  240.   widthList * =   level0 + indirect + 021H;
  241.  
  242. (*  ? OT_...KernPair supplies the kern adjustment to be added to the
  243.  *    current position after placement of the GlyphCode glyph and
  244.  *    before placement of the GlyphCode2 glyph.  Text kern pairs are
  245.  *    for rendering body text.  Display kern pairs are generally
  246.  *    tighter values for display (e.g. headline) purposes.  The
  247.  *    adjustment is represented as a fixed binary fraction of the
  248.  *    em-square, ignoring any effect of SetFactor.  This number would
  249.  *    need to be converted to a distance along the baseline in device
  250.  *    units by the application. *)
  251.   textKernPair   * = level0 + indirect + 022H;
  252.   designKernPair * = level0 + indirect + 023H;
  253.  
  254. (*  ? OT_Underlined is an unsigned word which is used to request
  255.  *    algorithimic underlining for the engine when rendering the glyph.
  256.  *    Bullet.library currently does not support this tag, though it
  257.  *    may be used by other engines in the future.  The default for
  258.  *    any engine which supports this tag must be OTUL_None.  Engines which
  259.  *    do not support this tag should return an appropriate OTERR value.
  260.  *
  261.  *    As of V39, diskfont.library will request underlining if specified
  262.  *    in the TextAttr, or TTextAttr passed to OpenDiskFont().  Diskfont
  263.  *    will first request Broken underlining (like the Text() function
  264.  *    does when SetSoftStyle() is used), and then Solid underlining if
  265.  *    the engine returns an error.  If the engine returns an error for
  266.  *    both, then diskfont.library attempts to find, or create the best
  267.  *    non-underlined font that it can. *)
  268.   underLined * =          level0 + 024H;
  269.  
  270.   ulNone           * = 0;
  271.   ulSolid          * = 1;
  272.   ulBroken         * = 2;
  273.   ulDoubleSolid    * = 3;
  274.   outlDoubleBroken * = 4;
  275.  
  276. (*  ? OT_StrikeThrough is a boolean which is used to request
  277.  *    algorithimic strike through when rendering the glyph.
  278.  *    Bullet.library currently does not support this tag, though it
  279.  *    may be used by other engines in the future.  The default for
  280.  *    any engined which supports this tag must be FALSE.  Engines which
  281.  *    do not support this tag should return an appropriate OTERR value. *)
  282.   strikeThrough * =       level0 + 025H;
  283.  
  284.  
  285. (********************************************************************)
  286. (* .otag tags *)
  287.  
  288. (* suffix for files in FONTS: that contain these tags *)
  289.   suffix  * = ".otag";
  290.  
  291. (* OT_FileIdent both identifies this file and verifies its size.
  292.  * It is required to be the first tag in the file. *)
  293.   fileIdent * =   level1 + 001H;
  294.  
  295. (* OT_Engine specifies the font engine this file is designed to use *)
  296.   engine  * =     level1 + indirect + 002H;
  297.   eBullet * =     "bullet";
  298.  
  299. (* OT_Family is the family name of this typeface *)
  300.   family * =      level1 + indirect + 003H;
  301.  
  302. (* The name of this typeface is implicit in the name of the .otag file *)
  303. (* OT_BName is used to find the bold variant of this typeface *)
  304.   bName * =       level2 + indirect + 005H;
  305. (* OT_IName is used to find the italic variant of this typeface *)
  306.   iName * =       level2 + indirect + 006H;
  307. (* OT_BIName is used to find the bold italic variant of this typeface *)
  308.   biName * =      level2 + indirect + 007H;
  309.  
  310. (* OT_SymSet is used to select the symbol set that has the OT_YSizeFactor
  311.  * described here.  Other symbol sets might have different extremes *)
  312.   symbolSet * =   level1 + 010H;
  313.  
  314. (* OT_YSizeFactor is a ratio to assist in calculating the Point height
  315.  * to BlackHeight relationship -- high word: Point height term, low
  316.  * word: Black height term -- pointSize = ysize*<high>/<low> *)
  317.   ySizeFactor * = level1 + 011H;
  318.  
  319. (* OT_SpaceWidth specifies the width of the space character relative
  320.  * to the character height *)
  321.   spaceWidth * =  level2 + 012H;
  322.  
  323. (* OT_IsFixed is a boolean indicating that all the characters in the
  324.  * typeface are intended to have the same character advance *)
  325.   isFixed * =     level2 + 013H;
  326.  
  327. (* OT_SerifFlag is a boolean indicating if the character has serifs *)
  328.   serifFlag * =   level1 + 014H;
  329.  
  330. (* OT_StemWeight is an unsigned byte indicating the weight of the character *)
  331.   stemWeight * =  level1 + 015H;
  332.  
  333.   sUltraThin  * = 8;   (*   0- 15 *)
  334.   sExtraThin  * = 24;  (*  16- 31 *)
  335.   sThin       * = 40;  (*  32- 47 *)
  336.   sExtraLight * = 56;  (*  48- 63 *)
  337.   sLight      * = 72;  (*  64- 79 *)
  338.   sDemiLight  * = 88;  (*  80- 95 *)
  339.   sSemiLight  * = 104; (*  96-111 *)
  340.   sBook       * = 120; (* 112-127 *)
  341.   sMedium     * = 136; (* 128-143 *)
  342.   sSemiBold   * = 152; (* 144-159 *)
  343.   sDemiBold   * = 168; (* 160-175 *)
  344.   sBold       * = 184; (* 176-191 *)
  345.   sExtraBold  * = 200; (* 192-207 *)
  346.   sBlack      * = 216; (* 208-223 *)
  347.   sExtraBlack * = 232; (* 224-239 *)
  348.   sUltraBlack * = 248; (* 240-255 *)
  349.  
  350. (* OT_SlantStyle is an unsigned byte indicating the font posture *)
  351.   slantStyle * =  level1 + 016H;
  352.   sUpright    * = 0;
  353.   sItalic     * = 1;       (* Oblique, Slanted, etc. *)
  354.   sLeftItalic * = 2;       (* Reverse Slant *)
  355.  
  356. (* OT_HorizStyle is an unsigned byte indicating the appearance width *)
  357.   horizStyle       * = level1 + 017H;
  358.   hUltraCompressed * = 16;     (*   0- 31 *)
  359.   hExtraCompressed * = 48;     (*  32- 63 *)
  360.   hCompressed      * = 80;     (*  64- 95 *)
  361.   hCondensed       * = 112;    (*  96-127 *)
  362.   hNormal          * = 144;    (* 128-159 *)
  363.   hSemiExpanded    * = 176;    (* 160-191 *)
  364.   hExpanded        * = 208;    (* 192-223 *)
  365.   hExtraExpanded   * = 240;    (* 224-255 *)
  366.  
  367. (* OT_SpaceFactor specifies the width of the space character relative
  368.  * to the character height *)
  369.   spaceFactor * = level2 + 018H;
  370.  
  371. (* OT_InhibitAlgoStyle indicates which ta_Style bits, if any, should
  372.  * be ignored even if the font does not already have that quality.
  373.  * For example, if FSF_BOLD is set and the typeface is not bold but
  374.  * the user specifies bold, the application or diskfont library is
  375.  * not to use OT_Embolden to achieve a bold result. *)
  376.   inhibitAlgoStyle * = level2 + 019H;
  377.  
  378. (* OT_AvailSizes is an indirect pointer to sorted UWORDs, 0th is count *)
  379.   availSizes    * =  level1 + indirect + 020H;
  380.   maxAvailSizes * =  20;      (* no more than 20 sizes allowed *)
  381.  
  382. (* OT_SpecCount is the count number of parameters specified here *)
  383.   specCount * =   level1 + 0100H;
  384.  
  385. (* Specs can be created as appropriate for the engine by ORing in the
  386.  * parameter number (1 is first, 2 is second, ... up to 15th) *)
  387.   spec * =        level1 + 0100H;
  388. (* OT_Spec1 is the (first) parameter to the font engine to select
  389.  * this particular typeface *)
  390.   spec1 * =       level1 + 0101H;
  391.  
  392.  
  393. (* ---------------------------------------------------------------- *)
  394. TYPE
  395. (*
  396.  *      glyph.h -- structures for glyph libraries
  397.  *)
  398.  
  399. (* A GlyphEngine must be acquired via OpenEngine and is read-only *)
  400.   GlyphEnginePtr * = UNTRACED POINTER TO GlyphEngine;
  401.   GlyphEngine * = STRUCT
  402.     library   - : e.LibraryPtr; (* engine library *)
  403.     name      - : e.LSTRPTR;    (* library basename: e.g. "bullet" *)
  404.     (* private library data follows... *)
  405.   END;
  406.  
  407.   FIXED * = LONGINT;          (* 32 bit signed w/ 16 bits of fraction *)
  408.  
  409.   GlyphMapPtr * = UNTRACED POINTER TO GlyphMap;
  410.   GlyphMap  * = STRUCT
  411.     bmModulo    * : INTEGER;  (* # of bytes in row: always multiple of 4 *)
  412.     bmRows      * : INTEGER;  (* # of rows in bitmap *)
  413.     blackLeft   * : INTEGER;  (* # of blank pixel columns at left *)
  414.     blackTop    * : INTEGER;  (* # of blank rows at top *)
  415.     blackWidth  * : INTEGER;  (* span of contiguous non-blank columns *)
  416.     blackHeight * : INTEGER;  (* span of contiguous non-blank rows *)
  417.     xOrigin     * : FIXED;    (* distance from upper left corner of bitmap *)
  418.     yOrigin     * : FIXED;    (*   to initial CP, in fractional pixels *)
  419.     x0          * : INTEGER;  (* approximation of XOrigin in whole pixels *)
  420.     y0          * : INTEGER;  (* approximation of YOrigin in whole pixels *)
  421.     x1          * : INTEGER;  (* approximation of XOrigin + Width *)
  422.     y1          * : INTEGER;  (* approximation of YOrigin + Width *)
  423.     width       * : FIXED;    (* character advance, as fraction of em width *)
  424.     bitMap      * : e.APTR;   (* actual glyph bitmap *)
  425.   END;
  426.  
  427.   GlyphWidthEntryPtr * = UNTRACED POINTER TO GlyphWidthEntry;
  428.   GlyphWidthEntry * = STRUCT (node *: e.MinNode);
  429.                               (* on list returned by OT_WidthList inquiry *)
  430.     code  * : INTEGER;        (* entry's character code value *)
  431.     width * : FIXED;          (* character advance, as fraction of em width *)
  432.   END;
  433.  
  434. (* ---------------------------------------------------------------- *)
  435. CONST
  436. (*
  437.  *      oterrors.h -- error results from outline libraries
  438.  *)
  439.  
  440. (* PRELIMINARY *)
  441.   errFailure * =          -1;      (* catch-all for error *)
  442.   errSuccess * =          0;       (* no error *)
  443.   errBadTag * =           1;       (* inappropriate tag for function *)
  444.   errUnknownTag * =       2;       (* unknown tag for function *)
  445.   errBadData * =          3;       (* catch-all for bad tag data *)
  446.   errNoMemory * =         4;       (* insufficient memory for operation *)
  447.   errNoFace * =           5;       (* no typeface currently specified *)
  448.   errBadFace * =          6;       (* typeface specification problem *)
  449.   errNoGlyph * =          7;       (* no glyph specified *)
  450.   errBadGlyph * =         8;       (* bad glyph code or glyph range *)
  451.   errNoShear * =          9;       (* shear only partially specified *)
  452.   errNoRotate * =         10;      (* rotate only partially specified *)
  453.   errTooSmall * =         11;      (* typeface metrics yield tiny glyphs *)
  454.   errUnknownGlyph * =     12;      (* glyph not known by engine *)
  455.  
  456. (* ---------------------------------------------------------------- *)
  457.  
  458. VAR
  459.   base * : e.LibraryPtr;
  460.  
  461. PROCEDURE OpenDiskFont       *{base,- 30}(VAR textAttr{8}     : g.TextAttr): g.TextFontPtr;
  462. PROCEDURE AvailFonts         *{base,- 36}(VAR buffer{8}       : ARRAY OF e.BYTE;
  463.                                           long{0}             : LONGINT;
  464.                                           flags{1}            : LONGSET): LONGSET;
  465.  
  466. (* ---   functions in V34 or higher  (Release 1.3)   --- *)
  467.  
  468. PROCEDURE NewFontContents    *{base,- 42}(fontsLock{8}        : e.BPTR;
  469.                                           fontName{9}         : ARRAY OF CHAR): FontContentsHeaderPtr;
  470. PROCEDURE DisposeFontContents*{base,- 48}(fontConstentsHeader{9} : FontContentsHeaderPtr);
  471.  
  472. (* ---   functions in V36 or higher  (Release 2.0)   --- *)
  473.  
  474. PROCEDURE NewScaledDiskFont  *{base,- 54}(sourceFont{8}       : g.TextFontPtr;
  475.                                           VAR destTextAttr{9} : g.TextAttr): DiskFontHeaderPtr;
  476.  
  477.  
  478. (* $OvflChk- $RangeChk- $StackChk- $NilChk- $ReturnChk- $CaseChk- *)
  479.  
  480. BEGIN
  481.   base :=  e.OpenLibrary(diskfontName,33);
  482.   IF base=NIL THEN
  483.     IF I.DisplayAlert(0,"\x00\x64\x14missing diskfont.library!\o\o",50) THEN END;
  484.     HALT(20)
  485.   END;
  486.  
  487. CLOSE
  488.   IF base#NIL THEN e.CloseLibrary(base) END;
  489.  
  490. END DiskFont.
  491.  
  492.